<?php

use yii\db\Migration;

/**
 * Handles adding columns to table `{{%contract}}`.
 */
class m220217_064409_add_documents_column_to_contract_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{%contract}}', 'doc_kp_request_one', $this->string(512));
        $this->addColumn('{{%contract}}', 'doc_kp_request_two', $this->string(512));
        $this->addColumn('{{%contract}}', 'doc_kp_answer_one', $this->string(512));
        $this->addColumn('{{%contract}}', 'doc_kp_answer_two', $this->string(512));
        $this->addColumn('{{%contract}}', 'doc_kp_screenshot', $this->string(512));
        $this->addColumn('{{%contract}}', 'doc_main_contract', $this->string(512));
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('{{%contract}}', 'doc_kp_request_one');
        $this->dropColumn('{{%contract}}', 'doc_kp_request_two');
        $this->dropColumn('{{%contract}}', 'doc_kp_answer_one');
        $this->dropColumn('{{%contract}}', 'doc_kp_answer_two');
        $this->dropColumn('{{%contract}}', 'doc_kp_screenshot');
        $this->dropColumn('{{%contract}}', 'doc_main_contract');
    }
}
